<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta charset="UTF-8" />
<title>Insert title here</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
</head>
<body>
	<input type="text" name="name" id="name" th:value="${gymResponse.name}"/>
				<input type="text" name="description" id="description" th:value="${gymResponse.description}"/>
				<input type="text" name="roomNumber" id="roomNumber" th:value="${gymResponse.roomNumber}"/>
	<table class="table table-striped">
	  <thead>
	    <tr>
	      <th>name</th>
	      <th>code</th>
	      <th>描述</th>
	      <th>操作</th>
	    </tr>
	  </thead>
	  <tbody>
	    <tr th:each="equipment : ${gymResponse.page.list}" >
	      <td th:text="${equipment.name}">1,001</td>
	      <td th:text="${equipment.code}">Lorem</td>
	      <td th:text="${equipment.description}">Lorem</td>
	      <!-- <td>
	      	<a th:href="'/membership/equipment/editEquipment/'+${equipment.id}+'/'+${currentPage}"><button id="editBtn" type="button" class="btn btn-warning btn-sm">编辑</button></a>
	        <a th:href="'/membership/equipment/delete/' + ${equipment.id }+'/'+${currentPage}"><button id = "deleteBtn" type="button" class="btn btn-danger btn-sm">删除</button></a>
	      </td> -->
	    </tr>
	  </tbody>
	</table>
	<div class="pagin">
		<div class="message">
			共<i class="blue" th:text="${gymResponse.page.page.count}"></i>个设备，页次&nbsp;<i
				class="blue" th:text="${currentPage }+'/'+${gymResponse.page.page.total }">&nbsp;</i>页
		</div>
		<ul class="paginList" th:if="${gymResponse.page.page.endPageIndex ne 0}">
			 <a href="javascript:;"><span class="pagepre"></span></a>
			<li class="paginItem"><a th:href="'/membership/gym/equipmentList/'+${gymResponse.id}+'/'+1"
				th:text="首页" style="cursor: hand;"> <span class="pagepre"></span>
			</a></li>
			<li th:each="num : ${#numbers.sequence(gymResponse.page.page.beginPageIndex, gymResponse.page.page.endPageIndex)}" class="paginItem current">
				<a th:if="${num eq currentPage}" href="javascript:void(0);">
                         <font color="red" th:text="${num}"></font>
                    </a>

                    <a th:if="${not(num eq currentPage)}" th:href="'/membership/gym/equipmentList/'+${gymResponse.id}+'/'+${num}">
                        <span th:text="${num}"></span>
                    </a>				
			</li>
			<li class="paginItem"><a th:text="尾页"
				th:href="'/membership/gym/equipmentList/'+${gymResponse.id}+'/'+${gymResponse.page.page.total}"
				style="cursor: hand;"><span class="pagenxt"></span> </a></li>
		</ul>
		<a th:href="'/membership/gym/addEquipment/'+${gymResponse.id}"><button>添加器材</button></a>
	</div>
	</body>
</html>